window.onload = function(){
    //获取 smallbox
    var smallbox = document.querySelector('.smallbox');
    //获取 bigbox
    var bigbox = document.querySelector('.bigbox');
    //获取 mask
    var mask = document.querySelector('.mask');
    //绑定 onmouseover
    smallbox.onmouseover = function(){
        bigbox.style.display = 'block';
        mask.style.display = 'block';
    }
    //绑定onmouseout
    smallbox.onmouseout = function(){
        bigbox.style.display = 'none';
        mask.style.display = 'none';
    }
    smallbox.onmousemove = function(e){
        console.log(e);
        var maskx = e.clientX - mask.offsetWidth/2;
        var masky = e.clientY - mask.offsetHeight/2;
        mask.style.left = maskx + 'px';
        mask.style.top = masky + 'px';
    }
}